<template>
  <div class="app-container">


    <div class="tabs-container">
      <div class="fixed-labels">
        <!--        如果不是处理员展示这个界面-->
        <el-tabs :tab-position="tabPosition" style="height: 785px;">
          <el-tab-pane label="事件详情" class="shenComponent">
            <!--  1           跌倒事件渲染-->
            <DiedaoXuanran v-if="zhanshi=='01'" style="height:800px;overflow: auto"></DiedaoXuanran>
            <!--  2           坠床事件渲染-->
            <Zhuichuangxuanran v-if="zhanshi=='02'" style="height:800px;overflow: auto"></Zhuichuangxuanran>
            <!--  3           压疮事件渲染-->
            <Yachuangxuanran v-if="zhanshi=='03'" style="height:800px;overflow: auto"></Yachuangxuanran>
            <!--  4           管路滑脱事件渲染-->
            <Guanluxuanran v-if="zhanshi=='04'" style="height:800px;overflow: auto"></Guanluxuanran>
            <!--  5           给药差错事件渲染-->
            <Chacuoxuanran v-if="zhanshi=='05'" style="height:800px;overflow: auto"></Chacuoxuanran>
            <!--  6           烧伤/烫伤事件渲染-->
            <Shaoshangxuanran v-if="zhanshi=='06'" style="height:800px;overflow: auto"></Shaoshangxuanran>
            <!--  7           输液反应事件渲染-->
            <Shuyexuanran v-if="zhanshi=='07'" style="height:800px;overflow: auto"></Shuyexuanran>
            <!--  8           病人自杀事件渲染-->
            <Zishaxuanran v-if="zhanshi=='08'" style="height:800px;overflow: auto"></Zishaxuanran>
            <!--  9           病人走失事件渲染-->
            <Bingrenzoushixuanran v-if="zhanshi=='09'" style="height:800px;overflow: auto"></Bingrenzoushixuanran>
            <!--  10          消毒供应事件渲染-->
            <xiaodugongyingxuanran v-if="zhanshi=='10'" style="height:800px;overflow: auto"></xiaodugongyingxuanran>
            <!--  11          其他事件渲染-->
            <Qitashijianxuanran v-if="zhanshi=='11'" style="height:800px;overflow: auto"></Qitashijianxuanran>
            <!--  12          手术事件渲染-->
            <shoushushijianxuanran v-if="zhanshi=='12'" style="height:800px;overflow: auto"></shoushushijianxuanran>
            <!--  13          麻醉事件渲染-->
            <Mazuixuanran v-if="zhanshi=='13'" style="height:800px;overflow: auto"></Mazuixuanran>
            <!--  14          诊疗相关事件渲染-->
            <Zenliaoxiangguan v-if="zhanshi=='14'" style="height:800px;overflow: auto"></Zenliaoxiangguan>
            <!--  15          医德医风事件渲染-->
            <Yifengyide v-if="zhanshi=='15'" style="height:800px;overflow: auto"></Yifengyide>
            <!--  16          病案管理相关事件渲染-->
            <Binganguanli v-if="zhanshi=='16'" style="height:800px;overflow: auto"></Binganguanli>
            <!--  17          院内不预期心跳停止事件渲染-->
            <Yuanneiyuqi v-if="zhanshi=='17'" style="height:800px;overflow: auto"></Yuanneiyuqi>
            <!--  18          给药错误渲染-->
            <Geiyaocuowu v-if="zhanshi=='18'" style="height:800px;overflow: auto"></Geiyaocuowu>
            <!--  19          近似给药错误渲染-->
            <Jinsigeiyao v-if="zhanshi=='19'" style="height:800px;overflow: auto"></Jinsigeiyao>
            <!--  20          医嘱或处方错误渲染-->
            <Yizhuchufang v-if="zhanshi=='20'" style="height:800px;overflow: auto"></Yizhuchufang>
            <!--  21          药物储存相关渲染-->
            <Yaowucunchu v-if="zhanshi=='21'" style="height:800px;overflow: auto"></Yaowucunchu>
            <!--  22          药物不良反应渲染-->
            <Buliangxuanran v-if="zhanshi=='22'" style="height:800px;overflow: auto"></Buliangxuanran>
            <!--  23          医疗器械报告渲染-->
            <QicaiXuanran v-if="zhanshi=='23'" style="height:800px;overflow: auto"></QicaiXuanran>
            <!--  24          感染聚集渲染-->
            <Ganranjuji v-if="zhanshi=='24'" style="height:800px;overflow: auto"></Ganranjuji>
            <!--  25          职业暴露渲染-->
            <Zhiyebaolu v-if="zhanshi=='25'" style="height:800px;overflow: auto"></Zhiyebaolu>
            <!--  26          医疗废物泄露渲染-->
            <Yiliaofeiwu v-if="zhanshi=='26'" style="height:800px;overflow: auto"></Yiliaofeiwu>
            <!--  27          用血安全渲染-->
            <Usebloodxuanran v-if="zhanshi=='27'" style="height:800px;overflow: auto"></Usebloodxuanran>
            <!--  28          输血不良渲染-->
            <Shuxuebuliangxuanran v-if="zhanshi=='28'" style="height:800px;overflow: auto"></Shuxuebuliangxuanran>
            <!--  29          检查事件渲染-->
            <Jianchaxuanran v-if="zhanshi=='29'" style="height:800px;overflow: auto"></Jianchaxuanran>
            <!--  30          检验事件渲染-->
            <Jianyancuanran v-if="zhanshi=='30'" style="height:800px;overflow: auto"></Jianyancuanran>
            <!--  31          病理切片事件渲染-->
            <Binglixuanran v-if="zhanshi=='31'" style="height:800px;overflow: auto" ></Binglixuanran>
            <!--  32          公共意外事件渲染-->
            <Gonggongyiwai v-if="zhanshi=='32'" style="height:800px;overflow: auto"></Gonggongyiwai>
            <!--  33          治安伤害事件渲染-->
            <Zhianshanghai v-if="zhanshi=='33'" style="height:800px;overflow: auto"></Zhianshanghai>
            <!--  34          后勤相关事件渲染-->
            <Houqinxuangguan v-if="zhanshi=='34'" style="height:800px;overflow: auto"></Houqinxuangguan>
            <!--  35          信息相关事件渲染-->
            <Xinxixuanran v-if="zhanshi=='35'" style="height:800px;overflow: auto"></Xinxixuanran>
            <!--  36          费用事件渲染-->
            <Feiyongxiangguanxuanran v-if="zhanshi==36" style="height:800px;overflow: auto"></Feiyongxiangguanxuanran>
            <!--  37          窗口服务事件渲染-->
            <Chuangkoufuwuxuanran v-if="zhanshi==37" style="height:800px;overflow: auto"></Chuangkoufuwuxuanran>
          </el-tab-pane>
          <!--          ==============================以上是事件组件无论权限是什么都是通用的================================================-->
<!--          <el-tab-pane label="事件摘要">
            <Zhaiyao style="height: 900px;overflow: auto"></Zhaiyao>
          </el-tab-pane>-->

          <!--      <el-tab-pane label="分析报告">-->
          <!--&lt;!&ndash;        判断&ndash;&gt;-->
          <!--        <Fenxi v-show="analysisList.length==0" style="height:900px;overflow:auto"></Fenxi>-->
          <!--        <Bianjifenxi v-show="analysisList.length==1" style="height:900px;overflow:auto" ></Bianjifenxi>-->
          <!--      </el-tab-pane>-->
          <!--      <el-tab-pane label="处理建议">-->
          <!--        <Chuli></Chuli>-->
          <!--      </el-tab-pane>-->
          <el-tab-pane label="事件追踪">
            <Zhuizong style="height:800px;overflow:auto" class="shenPane"></Zhuizong>
          </el-tab-pane>
          <el-tab-pane label="审核事件">
            <Shenhe style="height:800px;overflow:auto" class="shenHePane"></Shenhe>
          </el-tab-pane>
        </el-tabs>
      </div>
    </div>
  </div>
</template>

<script>
  import Fenxi from "@/views/module/shao/shijian/fenxi";
  import Bianjifenxi from "@/views/module/shao/shijian/bianjifenxi";
  import QicaiXuanran from "@/views/module/shao/shijian/qicaixuanran";
  import DiedaoXuanran from "@/views/module/shao/shijian/diedaoxuanran";
  import Zhuichuangxuanran from "@/views/module/shao/shijian/zhuichuangxuanran";
  import Buliangxuanran from "@/views/module/shao/shijian/badmedinflactxuanran";
  import Zhaiyao from "@/views/module/shao/shijian/zhaiyao";
  import Chuli from "@/views/module/shao/shijian/chuliyijian";
  import Jiean from "@/views/module/shao/shijian/jiean";
  import Chengsong from "@/views/module/whd/chengsong";
  import Zhuizong from "@/views/module/shao/shijian/zhuizong";
  import Shenhe from "@/views/module/whd/shenghe";
  import {listAnalysis} from "@/api/module/shao/shijian/analysis";
  // 徐嘉
  //压疮渲染
  import Yachuangxuanran from "@/views/module/xj/yachuangxuanran";
  //病人走失
  import Bingrenzoushixuanran from "@/views/module/xj/bingrenzoushixuanran";
  //其他事件
  import Qitashijianxuanran from "@/views/module/xj/qitashijianxuanran";
  //消毒供应
  import Xiaodugongyingxuanran from "@/views/module/xj/xiaodugongyingxuanran";
  //手术事件
  import Shoushushijianxuanran from "@/views/module/xj/shoushushijianxuanran";
  // 田润金
  //自杀事件
  import Zishaxuanran from "@/views/module/trj/zishaxuanran";
  //烧伤事件
  import Shaoshangxuanran from "@/views/module/trj/shaoshangxuanran";
  //给药差错
  import Chacuoxuanran from "@/views/module/trj/chacuoxuanran";
  //输液反应
  import Shuyexuanran from "@/views/module/trj/shuyexuanran";
  //管路滑脱
  import Guanluxuanran from "@/views/module/trj/guanluxuanran";
  // 崔馨元
  //院内不预期心跳停止
  import Yuanneiyuqi from "@/views/module/cxy/yuanneibuyuqixintiaotingzhixuanran";
  //给药差错
  import Geiyaocuowu from "@/views/module/cxy/geiyaocuowuxuanran";
  //近似给药错误
  import Jinsigeiyao from "@/views/module/cxy/jinsigeiyaoxuanran";
  //医嘱或处方错误
  import Yizhuchufang from "@/views/module/cxy/yizhuhuocufangxuanran";
  //董书妍
  //麻醉事件
  import Mazuixuanran from "@/views/module/dsy/mazuishijianxuanran";
  //诊疗相关
  import Zenliaoxiangguan from "@/views/module/dsy/zhenliaoxiangguanshijianxuanran";
  //医风医德
  import Yifengyide from "@/views/module/dsy/yifengyidexiangguanxuanran";
  //病案管理
  import Binganguanli from "@/views/module/dsy/binganguanlixiangguanxuanran";
  //程婉莹
  //感染聚集
  import Ganranjuji from "@/views/module/cwy/ganranjujixuanran";
  //药物存储
  import Yaowucunchu from "@/views/module/cwy/yaowucunchuxiangguanxuanran";
  //医疗废物
  import Yiliaofeiwu from "@/views/module/cwy/yiliaofeiwuxielouxuanran";
  //职业暴露
  import Zhiyebaolu from "@/views/module/cwy/zhiyebaoluxuanran";
  // 李佳桐
  //信息相关事件
  import Xinxixuanran from "@/views/module/ljt/xinxixuanran";
  //费用相关
  import Feiyongxiangguanxuanran from "@/views/module/ljt/feiyongxiangguanxuanran";
  //窗口服务
  import Chuangkoufuwuxuanran from "@/views/module/ljt/chuangkoufuwuxuanran";
  // 葛俊颉
  //用血安全
  import Usebloodxuanran from "@/views/module/gjj/useBloodxuanran";
  //输血不良
  import Shuxuebuliangxuanran from "@/views/module/gjj/transferBloodxuanran";
  //检查事件
  import Jianchaxuanran from "@/views/module/gjj/checkMeasurexuanran";
  //检验事件
  import Jianyancuanran from "@/views/module/gjj/inspectionMeasurexuanran";
  //齐健宇
  //病理切片
  import Binglixuanran from "@/views/module/qjy/binglixr"
  //公共意外
  import Gonggongyiwai from "@/views/module/qjy/ggongxr"
  //后勤相关
  import Houqinxuangguan from "@/views/module/qjy/houqinxr"
  //治安伤害
  import Zhianshanghai from "@/views/module/qjy/zhianxr"
  export default {
    name: "index",
    components: {
      //分析报告查看
      Bianjifenxi,
      //事件摘要
      Zhaiyao,
      //事件处理
      Chuli,
      //事件结案
      Jiean,
      //事件呈送
      Chengsong,
      //分析报告填写
      Fenxi,
      //事件追踪
      Zhuizong,
      //事件审核
      Shenhe,
      //跌倒事件
      DiedaoXuanran,
      //坠床事件
      Zhuichuangxuanran,
      //压疮事件
      Yachuangxuanran,
      //管路滑脱
      Guanluxuanran,
      //给药差错事件
      Chacuoxuanran,
      //烧伤/烫伤事件
      Shaoshangxuanran,
      //输液反应事件
      Shuyexuanran,
      //病人自杀事件
      Zishaxuanran,
      //病人走失
      Bingrenzoushixuanran,
      //消毒供应
      Xiaodugongyingxuanran,
      //其他事件
      Qitashijianxuanran,
      //手术事件
      Shoushushijianxuanran,
      //麻醉事件
      Mazuixuanran,
      //诊疗相关事件
      Zenliaoxiangguan,
      //医德医风相关
      Yifengyide,
      //病案管理相关
      Binganguanli,
      //院内不预期心跳停止事件
      Yuanneiyuqi,
      //给药错误
      Geiyaocuowu,
      //近似给药错误
      Jinsigeiyao,
      //医嘱或处方错误
      Yizhuchufang,
      //药物储存相关
      Yaowucunchu,
      //药物不良
      Buliangxuanran,
      //医疗器材管理
      QicaiXuanran,
      //感染聚集
      Ganranjuji,
      //职业暴露
      Zhiyebaolu,
      //医疗废物泄露
      Yiliaofeiwu,
      //用血安全渲染组件
      Usebloodxuanran,
      // 输血不良渲染组件注册
      Shuxuebuliangxuanran,
      // 检查事件渲染组件注册
      Jianchaxuanran,
      // 检验事件渲染组件注册
      Jianyancuanran,
      //病理切片事件渲染组件注册
      Binglixuanran,
      //公共意外事件
      Gonggongyiwai,
      //治安伤害事件
      Zhianshanghai,
      //后勤相关事件
      Houqinxuangguan,
      //信息相关渲染
      Xinxixuanran,
      //费用相关渲染
      Feiyongxiangguanxuanran,
      //窗口服务渲染
      Chuangkoufuwuxuanran,

    },

    data() {
      return {
        // 分析报告表格数据
        analysisList: [],
        fenxizhanshi: '',
        zhanshi: '',
        tabPosition: 'left',
        dialogData: null, // 存储需要传递的数据
        queryParams: {
          reportEventId: null,
        },

      }
    },
    created() {
      this.fuzhi();
      this.openFullScreen2()
    },
    methods: {
      openFullScreen2() {
        const loading = this.$loading({
          lock: true,
          text: '请稍等,正在渲染',
          spinner: 'el-icon-loading',
          background: 'rgba(0, 0, 0, 0.7)'
        });
        setTimeout(() => {
          loading.close();
        }, 1400);
      },
      fuzhi() {
        const type = this.$route.query.type;
        this.zhanshi = type
        //判定
        this.queryParams.reportEventId = this.$route.query.id;
        listAnalysis(this.queryParams).then(response => {
          this.analysisList = response.rows;
        });

      },

    },

  }
</script>

<style lang="scss" scoped>
@import "src/views/module/shao/blackFont";
.shenComponent{
  ::-webkit-scrollbar{
    width: 0px !important;
    height: 0px !important;
    border: none;
  }
  ::-webkit-scrollbar-track{
    width: 0!important;height: 0;
    border: none;
  }
}
.shenPane::-webkit-scrollbar {
  display: none; /* 隐藏滚动条 */
}
.shenPane{
  ::-webkit-scrollbar{
    width: 0px !important;
    height: 0px !important;
    border: none;
  }
  ::-webkit-scrollbar-track{
    width: 0!important;height: 0;
    border: none;
  }
}
.shenHePane::-webkit-scrollbar {
  display: none; /* 隐藏滚动条 */
}
.shenHePane{
  ::-webkit-scrollbar{
    width: 0px !important;
    height: 0px !important;
    border: none;
  }
  ::-webkit-scrollbar-track{
    width: 0!important;height: 0;
    border: none;
  }
}
</style>
